home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / python-support / python-cupshelpers / cupshelpers / __init__.py next >
Encoding:
Python Source  |  2008-09-25  |  1.7 KB  |  58 lines

  1. ## system-config-printer
  2.  
  3. ## Copyright (C) 2008 Red Hat, Inc.
  4. ## Copyright (C) 2008 Tim Waugh <twaugh@redhat.com>
  5.  
  6. ## This program is free software; you can redistribute it and/or modify
  7. ## it under the terms of the GNU General Public License as published by
  8. ## the Free Software Foundation; either version 2 of the License, or
  9. ## (at your option) any later version.
  10.  
  11. ## This program is distributed in the hope that it will be useful,
  12. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. ## GNU General Public License for more details.
  15.  
  16. ## You should have received a copy of the GNU General Public License
  17. ## along with this program; if not, write to the Free Software
  18. ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. __all__  = ['set_debugprint_fn',
  21.             'Device', 'Printer', 'activateNewPrinter',
  22.             'copyPPDOptions', 'getDevices', 'getPrinters',
  23.             'missingPackagesAndExecutables', 'parseDeviceID',
  24.             'setPPDPageSize',
  25.             'ppds',
  26.             'openprinting']
  27.  
  28. def _no_debug (x):
  29.     return
  30.  
  31. _debugprint_fn = _no_debug
  32. def _debugprint (x):
  33.     _debugprint_fn (x)
  34.  
  35. def set_debugprint_fn (debugprint):
  36.     """
  37.     Set debugging hook.
  38.  
  39.     @param debugprint: function to print debug output
  40.     @type debugprint: fn (str) -> None
  41.     """
  42.     global _debugprint_fn
  43.     _debugprint_fn = debugprint
  44.  
  45. from cupshelpers import                \
  46.     Device,                    \
  47.     Printer,                    \
  48.     activateNewPrinter,                \
  49.     copyPPDOptions,                \
  50.     getDevices,                    \
  51.     getPrinters,                \
  52.     missingPackagesAndExecutables,        \
  53.     parseDeviceID,                \
  54.     setPPDPageSize
  55.  
  56. import ppds
  57. import openprinting
  58.